how to find local maximum point and minimum point when rational function in calculus